home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2576 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: erinews.ericsson.se!usenet
  2. From: etlwihe@etlxdmx.ericsson.se ( wei he (martletts) )
  3. Newsgroups: comp.lang.c
  4. Subject: A question about STRING.
  5. Date: 22 Jan 1996 15:31:29 GMT
  6. Organization: Ericsson Telecommunications Ltd
  7. Message-ID: <4e0akh$853@erinews.ericsson.se>
  8. Reply-To: etlwihe@etlxdmx.ericsson.se
  9. NNTP-Posting-Host: etlma11m.ericsson.se
  10.  
  11. Hi there,
  12.  
  13. I have a problem with 'C' and need your help.
  14.  
  15. In my program, there is a variable MUTLI_RECORDS defined as char, which has a
  16. typical string as following:
  17.  
  18. 1,0,a,map010017000802532236,1,pp,0.2,1,0,map010017000802532236,acc,1,0. ...
  19.  
  20. In fact, this string contains many records. Each record contains seven columns.
  21. The columns in each record are seperated by the comma ','. Each record is 
  22. terminated by a full stop '.'.
  23.  
  24. What I want to do is to have a loop. In each loop, one record is extracted 
  25. from the MULTI_RECORDS and the different columns in this record are assigned to
  26. different variables. 
  27.  
  28. As the program is to run on a real time system, I have to keep the loops equal
  29. to the number of records hold in the MULTI_RECORDS, no inner loop is allowed.
  30.  
  31. Any suggestion on how to implement this or any other better mothed of achiving
  32. the same goal is highly appreciated.
  33.  
  34.  
  35. Cheers.
  36.  
  37. Wei
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.